<template>
  <van-card
    :desc="item.desc"
    :title="item.title"
    :thumb="houseImg"
  >
    <template #tags>
      <van-tag
        plain
        v-for="(item, index) in item.tags"
        :key="index"
        type="danger"
        >{{ item }}</van-tag
      >
    </template>
    <template #price>
      {{ item.price }}<span class="smile_price">元/月</span>
    </template>
  </van-card>
</template>

<script>
export default {
  name: 'PublicCard',
  data () {
    return {
      houseImg: 'http://liufusong.top:8080' + this.item.houseImg
    }
  },
  props: {
    item: Object,
    default: () => ({})
  }
}
</script>

<style lang="less" scoped>
  .van-card {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    .van-card__title {
      font-size: 14px;
      font-weight: 700;
    }
    .van-card__desc {
      color: #999;
      font-size: 12px;
    }
    .van-tag--danger.van-tag--plain {
      margin: 2px 4px 0 0;
      padding: 2px 4px;
      background-color: #e1f5f8;
      color: #39becd;
      &::before {
        border: 0;
      }
    }
    .van-card__price {
      font-weight: 700;
      color: red;
      font-size: 18px;
      .smile_price {
        font-weight: normal;
        font-size: 12px;
        margin-left: 3px;
      }
    }
  }
</style>
